/* Author : Putri Andita R   091511059
 * Proyek 4*/

package jtk.project4.fleet.screen.pmScheduleSetup;


import nl.coderight.jazz.Controller;
import jtk.project4.fleet.FleetModel;
import jtk.project4.fleet.event.NewEditScheduleEvent;
import jtk.project4.fleet.event.PMScheduleSetupEvent;
import jtk.project4.fleet.event.PMServicesEvent;
import jtk.project4.fleet.screen.addEditPMServices.addEditPMServicesController;
import jtk.project4.fleet.screen.newEditSchedule.newEditScheduleController;


public class pmScheduleSetupController extends Controller {
	private FleetModel fleetModel;
	private pmScheduleSetupView pMScheduleSetupView;
	
	public void handleEvent(NewEditScheduleEvent evt) {
		switch (evt.getType()) {
		case NEW:
			executeController(new newEditScheduleController());
			break;
		}
	}
	
	public void handleEvent(PMServicesEvent evt) {
		switch (evt.getType()) {
		case NEW:
			executeController(new addEditPMServicesController());
			break;
		}
	}
	@Override
	public void execute() {
		fleetModel = (FleetModel) getModel();
		pMScheduleSetupView = new pmScheduleSetupView();
		setView(pMScheduleSetupView);
		showView();
	}
}

